var ImgData = [{
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1489104977241.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104982668.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104982920.jpg']
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/  thumb_img/0_thumb_P_1490224521833.jpg']
}, {
    // img: ['https://x.dscmall.cn/storage/images/202101/thumb_img/0_thumb_P_1611858712231.jpg', 'https://x.dscmall.cn/storage/images/202106/thumb_img/1242_thumb_P_1622745809363.jpg']
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224295155.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224295307.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224291402.jpg'

}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224493856.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489105028525.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489105028508.jpg'

    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/goods_img/0_P_1490224493316.jpg']
}, {

    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224466138.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224466254.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224462894.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224408747.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224406930.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224351056.jpg']
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224320884.jpg']
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224265222.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224263168.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1489104621225.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104627793.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104628947.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104628914.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1489104534435.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104543433.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104543626.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104544834.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1489104168006.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104176059.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104176145.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1489104176308.jpg'
    // ]
}, {
    // img: ['https://x.dscmall.cn/storage/images/201703/thumb_img/_thumb_P_1490224438450.jpg',
    //     'https://x.dscmall.cn/storage/images/201703/thumb_img/0_thumb_P_1490224435860.jpg'
    // ]
}
]



// console.log(ImgData);
$(function () {
    $.each(allData.shangpin, function (i, v) {
        // console.log(v);
        // console.log(v.id);
        // console.log('第一次');
        var str = '';
        str += `
            <li class="gl-item" data-id="${v.id}">
            <div class="gl-i-wrap tm-m-photos tm-m-photos" >
                <div class="p-img tm-m-photo-viewer" >
                    
                    <img src="${v.img[0]}" class="bigImg">
                </div>
                <div class="sider">
                    <a href="javascript:void(0);" class="sider-prev prevStop" ><i
                            class="iconfont icon-left"></i></a>
                    <ul>`;
        // console.log(v.img);

        $.each(v.img, function (index, ele) {
            // console.log(index, ele);
            str += `
                        <li class="smallImg"><img
                            src="${ele}"
                                width="26" height="26">
                        </li>
                        `
        })

        str += `</ul>
                    <a href="javascript:void(0);" class="sider-next nextStop"><i
                            class="iconfont icon-right"></i></a>
                </div>
                <div class="p-lie">
                    <div class="p-price">
                        ¥${v.jiage}
                    </div>
                    <div class="p-num">已售<em>${v.xiaoliang}</em>件</div>
                </div>
                <div class="p-name">
                    <a href="javascript:void(0)"
                        title="${v.title}" target="_blank">
                        ${v.title}
                    </a>
                </div>
                <div class="p-store">
                    <a href="javascript:void(0);" title="${v.dianming}" class="store">${v.dianming}</a>
                    <a id="IM" href="javascript:void(0);" ru_id="0"
                        goods_id="643" class="p-kefup-c-violet">
                        <span class="iconfont icon-kefu"></span>
                    </a>

                </div>
                <div class="p-operate">
                    <a href="javascript:void(0);" id="compareLink">
                        <input id="${v.id}" type="checkbox" name="duibi" class="ui-checkbox"
                            >
                        <label class="ui-label" for="${v.id}">对比</label>
                    </a>
                    <a href="javascript:void(0);" class="choose-btn-coll">
                        <span class="iconfont icon-ban"></span>
                        收藏
                    </a>
                    <a href="javascript:void(0);"
                        
                        data-dialog="addCart_dialog" data-divid="addCartLog" data-title="请选择属性"
                        class="addcart">
                        <span class="iconfont icon-gouwuche
                            "></span>
                        加入购物车
                    </a>
                </div>
            </div>
            </li>
            `;
        // console.log(str);
        $('.items-large').append(str);

    })


})